package com.Utility;

import android.content.Context;
import android.view.Gravity;
import android.widget.Toast;

public class MessageManager {
	private static Toast TOAST;

	/**
	 * 
	 * @param st
	 */
	public static void showToast(Context mContext, String st) { // "Toast toast" is
										// declared in the
															// class
		try {
			TOAST.getView().isShown(); // true if visible
			TOAST.setText(st);
		} catch (Exception e) { // invisible if exception
			TOAST = Toast.makeText(mContext, st, Toast.LENGTH_LONG);
			TOAST.setGravity(Gravity.CENTER, 0, 0);
		}
		TOAST.show(); // finally display it
	}
}
